package com.base.cn.platform.os.service.exam.record;

import com.base.cn.platform.os.entity.exam.record.ExamBuyRecord;
import com.base.cn.platform.os.entity.exam.record.ExamBuyRecordCondition;
import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.exam.ExamBaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 试卷购买记录接口
 *
 * @author s.li
 * @date 2018/12/19
 */
@FeignClient(name = ExamBaseService.appName,configuration = FeignAuthConfig.class)
public interface ExamBuyRecordService extends ExamBaseService {
    /**
     * 生成试卷购买记录
     * @param examBuyRecodeList
     */
    @RequestMapping(contextPath + "/createExamBuyRecord")
    Map<String,Object> createExamBuyRecord(@RequestBody List<Map<String, Object>> examBuyRecodeList);

    /**
     * 通过试卷ID，查询购买记录Map,以试卷ID为KEY
     * @param condition 查询条件对象
     * @return Map<BigDecimal,ExamBuyRecode>
     */
    @RequestMapping(contextPath + "/findExamBuyRecordMap")
    Map<BigDecimal,Map<String,Object>> findExamBuyRecordMap(@RequestBody Map<String, Object> condition);

    /**
     * 通过试卷ID，查询购买记录Map,以试卷ID为KEY
     * @param condition 查询条件对象
     * @return Map<BigDecimal,ExamBuyRecord>
     */
    @RequestMapping(contextPath + "/findExamBuyRecordMaps")
    Map<BigDecimal, ExamBuyRecord> findExamBuyRecordMaps(@RequestBody ExamBuyRecordCondition condition);

    /**
     * 通过试卷ID，查询购买记录列表
     * @param condition 查询条件对象
     * @return List<ExamBuyRecode>
     */
    @RequestMapping(contextPath + "/findExamBuyRecordList")
    List<Map<String,Object>> findExamBuyRecordList(@RequestBody Map<String, Object> condition);
}
